package com.yufei.entity.goods;

import java.util.HashMap;
import java.util.Map;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;

import com.yufei.entity.Entity;
@CompoundIndexes({ 
@CompoundIndex(name = "goods_index", unique=true,def = "{mallId : 1, mallItemId : 1}") 
}) 
public class Goods extends Entity{
	public final static String stock_have="现在有货";
	public final static String stock_noHave="暂且无货";

	private Long  categoryId=null;
	
	private String url=null;
    
	private Double price=null;
	
    private String mallId=null;
    private String mallItemId=null;
	private String title=null;
	private String desc=null;
	private String stock=null;
	private Long findTime=null;
	private Long updatedTime=null;
	private boolean displayed=true;
	private double priceReduce=0;
    private boolean indexed=false;
    private String pictureUrl=null;



	 public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}

	public boolean getIndexed() {
		return indexed;
	}

	public void setIndexed(boolean indexed) {
		this.indexed = indexed;
	}

	public double getPriceReduce() {
		return priceReduce;
	}

	public void setPriceReduce(double priceReduce) {
		this.priceReduce = priceReduce;
	}

	public boolean getDisplayed() {
		return displayed;
	}

	public void setDisplayed(boolean displayed) {
		this.displayed = displayed;
	}

	public Long getFindTime() {
		return findTime;
	}

	public void setFindTime(Long findTime) {
		this.findTime = findTime;
	}

	public Long getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(Long updatedTime) {
		this.updatedTime = updatedTime;
	}

	public String getStock() {
		return stock;
	}
	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public void setStock(String stock) {
		this.stock = stock;
	}

	public String getUrl() {
			return url;
		}

		public String getMallId() {
		return mallId;
	}

	public void setMallId(String mallId) {
		this.mallId = mallId;
	}

	public String getMallItemId() {
		return mallItemId;
	}

	public void setMallItemId(String mallItemId) {
		this.mallItemId = mallItemId;
	}

		public void setUrl(String url) {
			this.url = url;
		}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

		//商品属性值（全部是离散值）
		private Map<String,Object> properties=new HashMap();

		public Map<String, Object> getProperties() {
			return properties;
		}

		public void setProperties(Map<String, Object> properties) {
			this.properties = properties;
		} 
		
}
